#pragma once
#include "stdafx.h"
//-------------------------------------------------------------------------------------------------
//ProcParamDefString.h  - String Parameter Definition for Image Processing Steps           
//-------------------------------------------------------------------------------------------------

#ifdef PLUGINICPROCSTEPS_EXPORTS
#define PLUGINICPROCSTEPS_API __declspec(dllexport)
#else
#define PLUGINICPROCSTEPS_API __declspec(dllimport)
#endif

#include "IPluginICProcStepsParamDefString.h"
#include "procparamdef.h"

class PLUGINICPROCSTEPS_API ProcParamDefString :	public ProcParamDef, IPluginICProcStepsParamDefString
{
friend class ImageProcFn;
public:
	ProcParamDefString(void);
	ProcParamDefString(int index, const char *Name, const char *Description, IPluginICProcStepsParamDef::Direction Dir, int MinLen, int MaxLen);
	virtual ~ProcParamDefString(void);

				//IMxPluginBase
	virtual long		MXSTDMETHOD DestroyPtr(void);
	virtual long		MXSTDMETHOD DuplicatePtr(void);
	virtual void *		MXSTDMETHOD Dynamic_cast(const char *IId);
	virtual const char *MXSTDMETHOD GetInterfaceGUID(void)  { return IPluginICProcStepsParamDefStringIID::GUID(); }
	virtual const char *MXSTDMETHOD GetInterfaceName(void) { return IPluginICProcStepsParamDefStringIID::Name(); }
				//IPluginICProcStepsParamDef
	virtual int			MXSTDMETHOD GetIndex() { return ProcParamDef::GetIndex(); }
	virtual const char *MXSTDMETHOD GetName() { return ProcParamDef::GetName(); }
	virtual const char *MXSTDMETHOD GetDescription() { return ProcParamDef::GetDescription(); }
	virtual IPluginICProcStepsParamDef::Direction MXSTDMETHOD GetDirection()  { return ProcParamDef::GetDirection(); }
	virtual bool		MXSTDMETHOD IsValid() { return ProcParamDef::IsValid();  }
	virtual bool		MXSTDMETHOD IsMatch(IPluginICProcStepsParam  *param, IPluginICProcStepsParamDef::Direction dir);
	virtual IPluginICProcStepsParamDef::TypeP MXSTDMETHOD GetTypeP() { return IPluginICProcStepsParamDef::stringP; }
	virtual const char *MXSTDMETHOD GetTypeStr() { return IPluginICProcStepsParamDefStringP; }
	virtual const char *MXSTDMETHOD GetDefaultValueStr();
	virtual const char *MXSTDMETHOD GetString();
				//IPluginICProcStepsParamDefString
	virtual int			MXSTDMETHOD GetMaxLength() { return _MaxLen; }
	virtual int			MXSTDMETHOD GetMinLength() { return _MinLen; }

protected:		//ProcParamDef
	virtual	bool	SetXml(void *xmlParam);
	virtual	bool	Validate();

private:
	int	_MinLen;
	int _MaxLen;

};


//-------------------------------------------------------------------------------------------------
//			E N D   O F   F I L E
//-------------------------------------------------------------------------------------------------
